﻿using System;
using System.ComponentModel.DataAnnotations;

namespace OConf.Model
{
    /// <summary>
    /// 获取版本历史信息请求参数
    /// </summary>
    public class GetVersionsInput
    {
        /// <summary>
        /// 命名空间ID
        /// </summary>
        [Required(ErrorMessage = "命名空间ID不能为空")]
        public string NameSpaceID { get; set; }
    }

    /// <summary>
    /// 版本历史信息返回参数
    /// </summary>
    public class VersionsModel
    {
        /// <summary>
        /// ID
        /// </summary>
        public string ID { get; set; }

        /// <summary>
        /// 版本号
        /// </summary>
        public string VersionNo { get; set; }

        /// <summary>
        /// 发布时间
        /// </summary>
        public DateTime Createtime { get; set; }
    }

    /// <summary>
    /// 版本回滚请求参数
    /// </summary>
    public class VersionRollBackInput
    {
        /// <summary>
        /// 版本ID
        /// </summary>
        [Required(ErrorMessage = "版本ID")]
        public string VersionID { get; set; }
    }

    /// <summary>
    /// 获取配置历史信息请求参数
    /// </summary>
    public class GetConfigInfoHistoryInput
    {
        /// <summary>
        /// 版本ID
        /// </summary>
        [Required(ErrorMessage = "版本ID")]
        public string VersionID { get; set; }
    }

    /// <summary>
    /// 配置历史信息模型
    /// </summary>
    public class ConfigInfoHistoryModel
    {
        /// <summary>
        /// 配置key
        /// </summary>
        public string ConfigKey { get; set; }

        /// <summary>
        /// 配置value
        /// </summary>
        public string ConfigValue { get; set; }

        /// <summary>
        /// 配置描述
        /// </summary>
        public string ConfigDescription { get; set; }
    }
}
